Since
39c2d12330b6d4405ca8a5599c12017c58626fcf,
priv->operation_mode == OPERATION_MODE_BROWSE no longer
guarantees that priv->browse_files_model is the current
model of the list - we are only switching the models after
loading the new directory. Avoid triggering the assertion
in show_and_select_files by checking if we have right model
before calling it.
https://bugzilla.gnome.org/show_bug.cgi?id=761209
GtkFileChooserWidgetPrivate *priv = impl->priv;
GFile *parent_file;
gboolean same_path;
+ GtkFileSystemModel *fsmodel;
parent_file = g_file_get_parent (file);
if (!parent_file)
return gtk_file_chooser_set_current_folder_file (chooser, file, error);
+ fsmodel = GTK_FILE_SYSTEM_MODEL (gtk_tree_view_get_model (GTK_TREE_VIEW (priv->browse_files_tree_view)));
+
if (priv->operation_mode == OPERATION_MODE_SEARCH ||
priv->operation_mode == OPERATION_MODE_RECENT ||
- priv->load_state == LOAD_EMPTY)
+ priv->load_state == LOAD_EMPTY ||
+ priv->browse_files_model != fsmodel)
{
same_path = FALSE;
}